
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>贴吧</title>
<!--样式设置-->
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/static/plugins/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath } /static/plugins/font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body>

	<nav class="navbar navbar-default">
		<div class="container-fluid">
			<!-- Brand and toggle get grouped for better mobile display -->

			<div class="navbar-header" style="width: 100%">

				<div style="float: left;">
					<a class="navbar-brand" href="#" style="margin-left: 20px">
						java技术论坛 </a>
				</div>

				<div style="float: right;">
				 <c:if test="${name!=null }">
				 <a class="navbar-brand" style="font-size: 15px">${name }</a>
				 <span class="navbar-brand">|</span>
				 <a class="navbar-brand" href="${pageContext.request.contextPath }/login">切换帐号</a>
				 </c:if>
					
				 <c:if test="${name==null }">
				 <a class="navbar-brand" href="${pageContext.request.contextPath }/login"
						style="font-size: 15px">登录</a> <span class="navbar-brand">|</span>
					<a class="navbar-brand" href="${pageContext.request.contextPath }/registe"
						style="font-size: 15px">注册</a>
				 
				 </c:if>
					
					
					<form class="navbar-form navbar-left" role="search">
						<div class="form-group">
							<input type="text" class="form-control" placeholder="Search">
						</div>
						<button type="submit" class="btn btn-default">收索</button>
					</form>
				</div>
			</div>
		</div>

		<div class="container">
			<div class="panel">
				<div class="panel panel-title">
					<ul class="nav navbar-nav">
						<li><a href="${pageContext.request.contextPath }/Mune">首页</a></li>
						<li><a href="#">精选话题</a></li>
						<li><a href="#">论坛帮助</a></li>
						
						<li class="active"><a href="#">贴吧 <span class="sr-only">(current)</span></a></li>
					</ul>
				</div>
			</div>
		</div>
	</nav>
	
	<div class="container">
		<div class="row">
			<div class="col-md-8" style="height:600px">
				<div id="carousel-example-generic" class="carousel slide"
					data-ride="carousel">
					<!-- Indicators -->
					<ol class="carousel-indicators">
						<li data-target="#carousel-example-generic" data-slide-to="0"
							class="active"></li>
						<li data-target="#carousel-example-generic" data-slide-to="1"></li>
						<li data-target="#carousel-example-generic" data-slide-to="2"></li>
					</ol>

					<!-- Wrapper for slides -->
					<div class="carousel-inner" role="listbox">
						<div class="item active">
							<img src="${pageContext.request.contextPath }/static/images/timg.jpg" alt="..."
								style="width: 750px; height: 500px;">
							<div class="carousel-caption">first</div>
						</div>
						<div class="item">
							<img src="${pageContext.request.contextPath }/static/images/timg (1).jpg" alt="..."
								style="width: 750px; height: 500px;">
							<div class="carousel-caption">second</div>
						</div>
						<div class="item">
							<img src="${pageContext.request.contextPath }/static/images/timg (2).jpg" alt="..."
								style="width: 750px; height: 500px;">
							<div class="carousel-caption">third</div>
						</div>
					</div>

					<!-- Controls -->
					<a class="left carousel-control" href="#carousel-example-generic"
						role="button" data-slide="prev"> <span
						class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">Previous</span>
					</a> <a class="right carousel-control" href="#carousel-example-generic"
						role="button" data-slide="next"> <span
						class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">Next</span>
					</a>
				</div>
			</div>
			
			<div class="col-md-4" style="height:600px">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">发帖专区</h3>
					</div>
					<div class="panel-body">有关技术，一起探讨。</div>
					
				      <c:if test="${name!=null }">
					<a href="${pageContext.request.contextPath }/Sendpost"><input  class="btn btn-primary btn-block" type="button" value="发帖"></a>
					</c:if>
					
				   	<c:if test="${name==null }">
					<a href="${pageContext.request.contextPath }/login"><input  class="btn btn-primary btn-block" type="button" value="发帖"></a>
					</c:if>
					
					<c:forEach items="${requestScope.topictype}" var="top">
					<ul class="list-group">
						<li class="list-group-item"><a>${top.title } </a></li>
						
					</ul>
					</c:forEach>
				</div>
			</div>
		</div>
	</div>
	
	
		<div class="panel-body">
		
					<div class="col-md-10">
						<h3>最新帖子</h3>
						
						<table class="table table-hover">
 						<thead>
	 						<tr>
		 						<th>发帖人</th>
		 						<th>帖子标题</th>
		 						<th>帖子内容</th>
		 						<th>帖子查看数/帖子回复数</th>
								<th>发帖时间</th>
	 						</tr>
 						</thead>
 						 <c:forEach items="${requestScope.topic}" var="u"> 
 						<tbody>
	 						<tr>
		 						<td>${u.tid}</td>
		 						<td></td>
		 						<td></td>
		 						<td></td>
		 						<td></td>
	 						</tr>
 						</tbody>
 						</c:forEach>>
                         </table>
                         
						<%--  <c:forEach items="${requestScope.topic}" var="u"> 
						
							<li class="list-group-item">
							
							<a href="reply.jsp?tid=${u.tid}">【${u.title}】</a>
							<a href="#">${u.content} </a>
							<a href="#" class="pull-right">【${u.pubdate}】</a>
							
						
							
						</c:forEach>  --%>
						
					</div>
				</div>
				
				
	<!-- 引入jQuery的js -->
	<script src=" ${pageContext.request.contextPath }/static/plugins/jquery-1.11.3.min.js"></script>
	<!-- 引入bootstrap的js -->
	<script
		src="${pageContext.request.contextPath }/static/plugins/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
</body>
</html>